package com.kzc.controller;

import com.kzc.base.model.Result;
import com.kzc.entity.Article;
import com.kzc.entity.FeedBack;
import com.kzc.service.CollectionService;
import com.kzc.service.FeedBackService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * Author：柯尊诚
 * Created by anyleKe on 2016/2/26.
 */
@Controller
public class FeedBackController {

    @Autowired
    FeedBackService feedBackService;

    @ResponseBody
    @RequestMapping(value = "/feedBack", method = RequestMethod.POST)
    public Result add(@ModelAttribute FeedBack feedBack) {
        System.out.print(feedBack.toString());
        return feedBackService.add(feedBack);
    }
}
